# Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
# This source file is part of the Cangjie project, licensed under Apache-2.0
# with Runtime Library Exception.
#
# See https://cangjie-lang.cn/pages/LICENSE for license information.

file(GLOB_RECURSE CJM_SRC *.cpp)

set(LIB_NAME cjm_${VERSION})
add_library(${LIB_NAME} SHARED ${CJM_SRC})

add_definitions(-DCANGJIE_AST2CHIR2)

target_compile_definitions(${LIB_NAME} PRIVATE -DBASE_VERSION=\"${VERSION}\")

target_include_directories(${LIB_NAME} PRIVATE ${INCLUDE_DIR} ${CANGJIE_ROOT}/include)

target_link_libraries(${LIB_NAME} PRIVATE sdk-cangjie-lsp)
target_link_libraries(${LIB_NAME} PRIVATE platform)
target_link_libraries(${LIB_NAME} PRIVATE fs_compat)
